package com.wtwd.device.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wtwd.device.model.entity.DeviceSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

@Mapper
public interface DeviceSettingMapper {
    IPage<DeviceSetting> getDeviceSettingListByWatchId(@Param("watchId") String watchId, @Param("userId") Long userId, @Param("page") Page< DeviceSetting> page);

    Integer addDeviceSetting(@Param("data") DeviceSetting data);

    List<DeviceSetting> getDeviceListByWatchId(@Param("watchId") String watchId);

    Integer modifyDeviceSettingByWatchId(@Param("data") DeviceSetting data);

    DeviceSetting getDeviceSettingById(@Param("id") Integer id);

    DeviceSetting getDeviceSettingByuserIdAndWatchId(@Param("userId") Long userId,@Param("watchId") String watchId);

    List<String> getWatchIdByUserId(Long userId);

    ArrayList<String> getWatchByGroupWatchId(@Param("list") List<String> watchIdList);
}
